package com.example.bean;

import lombok.Getter;
import lombok.Setter;
public enum TianxieStatus {
	NONE(-1,"未填写"),
	DRAFT(0,"草稿"),
	COMMIT(1,"已提交|待审核"),
	PASS(2,"已通过"),
	UNPASS(3,"未通过"),
	;
	@Setter
	@Getter
	private Integer status;
	@Setter
	@Getter
	private String meaning;

	TianxieStatus(Integer status, String meaning) {
		this.status = status;
		this.meaning = meaning;
	}
	public static String getMeaning(Integer status){
		String meaning = "";
		if(status!=null){
			TianxieStatus[] values = TianxieStatus.values();
			for (TianxieStatus value : values) {
				if(value.getStatus().equals(status)){
					meaning =  value.getMeaning();
					break;
				}
			}
		}
		return meaning;
	}
}

